package com.gege.service.impl;

import com.gege.mapper.UserMapper;
import com.gege.model.User;
import com.gege.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author gechenpeng
 * @date 2021-05-26
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User saveUser(User user) {
        userMapper.insert(user);
        return user;
    }

    @Override
    public User findUserById(Long id) {
        return userMapper.selectById(id);
    }
}
